import {HYEventStore} from 'hy-event-store'
const db = wx.cloud.database()
const userStore = new HYEventStore({
  state:{
    id:"",
    isLogin:"false",
    nickname:"",
    password:"",
    songlist:"",
    username:"",
    avatarUrl:"",
    sex:"",  
  },
  actions:{
    clearUserInfo(ctx){
      ctx.id = ""
      ctx.isLogin = "false"
      ctx.nickname = ""
      ctx.songlist = ""
      ctx.username = ""
      ctx.sex = ""
      ctx.avatarUrl = ""
    }
  }

})

export {
  userStore
}